<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie-edge">
    <title>flex布局</title>
    <meta http-equiv="X-UA-Compatible" content="ie-edge">
    <style>
        .container {
            width: 500px;
            height: 500px;
            border: 1px solid #000;
            display: flex;
            flex-direction: column;
            flex-wrap: wrap;
            /* overflow: hidden; */
        }

        .item {
            width: 200px;
            height: 200px;
        }

        .item1 {
            background-color: green;
        }

        .item2 {
            background-color: red;
        }

        .item3 {
            background-color: pink;
        }

        .item4 {
            background-color: lightblue;
        }

        .item5 {
            background-color: orange;
        }

        .item6 {
            background-color: grey;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="item1 item">1</div>
        <div class="item2 item">2</div>

        <div class="item3 item">3</div>
        <div class="item4 item">4</div>
        <div class="item5 item">5</div>
        <div class="item6 item">6</div>
    </div>
</body>

</html>